﻿using System.Collections.Generic;
using UnityEngine;

public abstract class EffectSystem
{
    public  int Mana { set; get; }
    public  string Description { set; get; }
    // 抽象属性，让子类至少实现其中一个
    public virtual Effect ManualTargetEffect { set; get; } = null;
    public virtual List<AutoTargetEffect> OtherEffects { set; get; } = new List<AutoTargetEffect>();




// 初始化==============================================

    public virtual void Setup(int proNum)
    {
        SetProNumber(proNum);
        SetupByProNumber();
    }
    //只用于判断效果 不要从这里拿升级数字 去card拿 
    protected int ProNumber { get; set; } = 0;
    protected void SetProNumber(int num)
    {
        ProNumber = num;
    }
    // 顺序一定要对！！
    protected abstract void SetupByProNumber();
    // =====================================================



    //特殊方法 不使用GA意味着无法被ActionSystem监听
    public virtual List<CombatantView> specialTargets { get; set; } = new List<CombatantView>();

    public virtual CombatantView specialManualTarget { set; get; }

    public virtual bool IsSpecialManualTarget { get; set; } = false;
    public virtual void ManualTargetSpecial() { }



    public virtual void Special()
    {
        foreach (var targets in specialTargets)
        {
            SpecialFun(targets);
        }
    }
    public virtual void SpecialFun(CombatantView targets) { }
}
